As a semiconductor pattern becomes finer, a slight difference in a shape influences operation characteristics of a device, and thus, there is an increasing need for shape management. Thus, a scanning electron microscope (SEM) used in testing and measuring a semiconductor needs to have higher sensitivity and higher precision than those in the related art. In the SEM, when a sample is irradiated with an electron beam, secondary electrons emitted from the sample are detected, and thus, a shape of a surface is observed. In this case, the detected secondary electrons have low energy, and are easily influenced by electric charge on the sample. In recent years, since the pattern becomes finer and a material of low-dielectric constant such as low-k is used, the influence of the electric charge becomes apparent, and thus, it may be difficult to capture a signal of a location requiring management. Electric charge potential is distributed in an unevenness shape, and thus, a variation is caused in image contrast in the field of view (FOV). Thus, left, right, upper, and lower profiles may be asymmetric even though a pattern of which shapes of left and right edges or upper and lower edges are symmetric.
PTL 1 discloses a scanning method of inverting a direction in which a beam moves over scan lines in each of a plurality of frames and inverting an order in which a plurality of scan lines is scanned. PTL 2 describes a reciprocating scanning method of an electron beam. The reciprocating scanning is a scanning method of inverting a scan direction in an X-line direction for every scan line.